package com.neusoft.mapper;

import com.neusoft.po.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProductMapper {

    // 查询所有商品
    @Select("SELECT * FROM Product")
    List<Product> getAllProducts();

    // 根据 productId 查询商品
    @Select("SELECT * FROM Product WHERE productId = #{productId}")
    Product getProductById(Integer productId);
}